package edu.sctu.practice.class02.xuqianlan.assign.assign02;

import java.lang.*;

/**
 * Created by lenovo on 2015/10/29.
 */
public class Max {
    public static Comparable max(Comparable o1, Comparable o2){
        if(o1.compareTo(null)<o2.compareTo(null)){
            System.out.println("第一个面积大");
            return o1;
        }else if (o1.compareTo(null)>o2.compareTo(null)){
            System.out.println("后一个面积大");
            return o2;

        }
        else{
            System.out.println("两面积相等");
            return o1;
        }
    }

}
